<?php
	class ShopinfoModel extends Model{

		/**
		 * 添加商铺店面信息
		 * Enter description here ...
		 * @param unknown_type $data
		 */
		public function addShopinfo($data){
			return $this->add($data);
		}
		
		/**
		 * 更新商铺店面信息
		 * Enter description here ...
		 * @param unknown_type $map
		 */
		public function updateShopinfo($map = array()){
	    	$this->data(map)->save();
	    }
		
		/**
		 * 删除商铺店面信息
		 * Enter description here ...
		 * @param unknown_type $ids
		 */
		public function deleteShopinfo($ids){
			//防误操作
	    	$ids = is_array($ids) ? $ids : explode(',', $ids);
	    	foreach($ids as $k => $v) {
	    		if ( !is_numeric($v) ) unset($ids[$k]);
	    	}
	    	if ( empty($ids) ) return false;
	    	
	    	$map[id] = array('in', $ids);
	    	//user
    		$this->where($map)->delete();
    		return true;
		}
		/**
		 * 根据商家ID查询商铺店面信息
		 * Enter description here ...
		 */
		public function findShopuserBySuid($suid){
			$map[suid] = array('gt',$suid);
	    	return $this->where($map)->select();
		}
	}

?>